-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid dev packages when building the phar #37
base: 1.x
Are you sure you want to change the base?
Conversation
Presumably there should be --dev / --no-dev options in the future.
Neither am I ;-) IIRC this was chosen in order to check which packages have actually been installed, vs which one have been locked. IMHO it makes sense to skip pure As such, I'm all for getting this in! Can you update your PR with a few test cases to confirm this doesn't break anything? |
Ping @radford, is there anything I can help you with? :) |
Upon further inspection I think we should consider a few more things (just listing some random thoughts):
As an alternative approach, we may also look into merely detecting if dev dependencies have been installed. We could then either ask the user to confirm or abort or in the future also suggest installing into a temporary directory without dev dependencies. Any thoughts? |
Do you have a use case where dev dependencies in a phar make sense? To my mind, if you are releasing your dev dependencies, then they are not dev dependencies. I'd would suggest bumping the major version and dropping them. |
Nope, afaict it never makes sense to bundle the dev dependencies and I'm all for dropping them! 👍 My previous comment was more about how we should drop them and what we have to keep in mind. Afaict some of these aren't addressed currently, so I'm not sure we should merge this yet. What are your thoughts on this? |
This is a wart for sure, but I agree it is unlikely to cause problems.
I don't see the point of this use case. If the library has dependencies, then it should have a
If you are referring to a git bare repository, then I don't see how it makes sense to run in a bare repository. If by bare you mean in a repository where Overall I think dropping dev dependencies is bug fix, but we should bump the version number in case there is someone that depends on the old behavior. I suggest making the documented way to use |
" If the library has dependencies, then it should have a composer.lock to fix those versions." - seriously? since when libraries have composer.lock? Libraries enforce "versions" with upper/lower bounds of versions in composer.json, and not the .lock. |
Thanks for filing this PR @Grisou13, I'd love to see this in! Unfortunately, this PR is currently incomplete and hasn't seen any updates in some time. I've just moved most of the discussion to #61, perhaps we should address that one first before continuing this PR? 👍 Would you guys care to comment on this ticket first? Thanks! |
@clue, could you be more specific about what's missing from the PR? I stand by my contention that this is bug fix and the incompatibility should be handled by bumping the version number. |
Personally, I'm fine with dropping them. However, if one needs to release a # lean production version
$ php my.phar serve
# development version
$ php my_dev.phar serve --debug
$ php my_dev.phar run-tests # internal unit tests on the current platform
$ php my_dev.phar create-docs docs/ # create html docs |
Any news on this ? |
I'm not sure what "version" was being referred to when choosing
installed.json
overcomposer.lock
, but the former has no notion of dev/no-dev whereas the later does. This works for me, but is a breaking change in that the current default includes dev packages. Alternatively there could be--dev
/--no-dev
options tobuild
defaulting to--dev
, but allowing--no-dev
similar tocomposer install
itself.